<template>
  <Header />
  <RouterView />
</template>
<script setup>
import { onMounted, onUnmounted, nextTick } from "vue";
import Header from "@/components/Header.vue";
import { RouterView } from "vue-router";
const updateSize = () => {
  nextTick(() => {
    var appElement = document.getElementById("app");
    appElement.style.width = window.innerWidth + "px"; // 设置宽度为200px
    appElement.style.height = window.innerHeight + "px"; // 设置高度为100px
  });
};

onMounted(() => {
  window.addEventListener("resize", function () {
    updateSize();
  });
});

onUnmounted(() => {
  window.removeEventListener("resize", function () {
    updateSize();
  });
});
</script>

